//
//  YAnimatedImagesView.h
//  yuimall_Iphone
//
//  Created by Gang.Wang on 12-5-12.
//  Copyright (c) 2012年 yuike. All rights reserved.
//

#import "UIViewEx.h"

#define kYAnimatedImagesViewDefaultTimePerImage 5.0f

@protocol YAnimatedImagesViewDelegate;
@interface YAnimatedImagesView : UIViewEx
@property (nonatomic, assign) id<YAnimatedImagesViewDelegate> delegate;

/* Default if not set is kYAnimatedImagesViewDefaultTimePerImage */
@property (nonatomic, assign) NSTimeInterval timePerImage;

- (void)startAnimating;
- (void)stopAnimating;

- (void)reloadData;
@end

@protocol YAnimatedImagesViewDelegate
- (NSUInteger)animatedImagesNumberOfImages:(YAnimatedImagesView *)animatedImagesView;
- (UIImage *)animatedImagesView:(YAnimatedImagesView *)animatedImagesView imageAtIndex:(NSUInteger)index;
- (void) whichImageViewWillShow:(NSNumber *) index;
@end